<template>
  <div class="container">
    <div id="btn" class="logo"><img src="../assets/logo1.png" /></div>
    <div class="ani"><button @click="onclick()">测试</button></div>
  </div>
</template>

<script setup lang="ts">
// import { ipcRenderer } from 'electron'

//import { useAppStore } from '../store'

//const appStore = useAppStore()
//appStore.init()
function openWindow() {
  //  ipcRenderer.send('on-open-event')
  console.log('on-open-event')
  console.log(window.myApi)
  window.myApi.openWindow({
    width: 800,
    height: 600,
    url: 'http://electron.org.cn'
  })
}

function onclick() {
  openWindow()
}
</script>

<style scoped>
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 62px;
  background-color: rgba(0, 0, 0, 0);
}
.container img {
  width: 32px;
  height: auto;
}

img:hover {
  animation: spin 1s linear infinite reverse;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
</style>
